package com.tencent.sr.iris.basic.saas.common.enums;

public enum IrisOrderStatusEnum {
    CREATED("CREATED", "待付款"),
    DELIVER_PENDING("DELIVER_PENDING", "待发货"),
    SENT("SENT", "待收货"),
    SUCCESS("SUCCESS", "交易完成"),
    CANCEL("CANCEL", "已取消");

    private String status;

    private String desc;

    IrisOrderStatusEnum(String status, String desc) {
        this.status = status;
        this.desc = desc;
    }

    public String getStatus() {
        return status;
    }

    public String getDesc() {
        return desc;
    }

    public static String getByStatus(String status) {
        for (IrisOrderStatusEnum orderStatusEnum : IrisOrderStatusEnum.values()) {
            if (orderStatusEnum.getStatus().equals(status)) {
                return orderStatusEnum.getDesc();
            }
        }
        return "";
    }
}
